<template>
  <div class="iconbox">
    <svg class="icon" aria-hidden="true">
      <use :xlink:href="icon" />
    </svg>
  </div>
</template>

<script>
/**
*引入组件
*注册组件
*template:
*       <MyIcon icon='#icon-*****'></MyIcon>
*/
export default {
  props: ['icon']
}
</script>

<style>
.iconbox {
  display: inline-block;
}
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
